package com.future.hedongjun.mine.ui;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.View;
import android.widget.FrameLayout;

import com.flyco.tablayout.SegmentTabLayout;
import com.future.baselib.activity.BaseActivity;
import com.future.hedongjun.R;
import com.future.hedongjun.mine.order.ClassOrderListFragment;
import com.future.hedongjun.mine.order.MallOrderFragment;
import com.future.hedongjun.mine.order.OrderListFragment;

import java.util.ArrayList;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MyOrderActivity extends BaseActivity {

    @BindView(R.id.tabLayout)
    SegmentTabLayout tabLayout;
    @BindView(R.id.fragment_container)
    FrameLayout fragmentContainer;

    private String[] titles = {"商城订单","课程订单"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_order);
        setTitle("我的订单");
        ButterKnife.bind(this);
        titleLine.setVisibility(View.GONE);
        ArrayList<Fragment> fragments = new ArrayList<>();
        fragments.add(new MallOrderFragment());
        fragments.add(new ClassOrderListFragment());
        tabLayout.setTabData(titles,this,R.id.fragment_container, fragments);

    }
}
